<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>部门列表</title>
    <link rel="stylesheet" href="/static/css/layui.css">
</head>
<body style="padding-left: 10px;padding-right: 10px;">
<div class="searchTable">
    <form class="layui-form" onsubmit="return false">
        <div class="layui-form-item" style="width:25%">
            <label class="layui-form-label">是否可用：</label>
            <div class="layui-input-block">
                <select class="layui-select" id="status" lay-filter="search">
                    <option class="layui-select-group" selected="selected" value="1">可用</option>
                    <option class="layui-select-group" value="0">不可用</option>
                </select>
            </div>
        </div>
        <button id="searchBtn" style="margin-left: 10%;display: none" class="layui-btn" data-type="reload"></button>
    </form>
</div>
<table class="layui-hide" id="departmentList" lay-filter="departmentList"></table>
<!-- 操作栏的两个内容 -->
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    {{#  if(d.status == "1"){ }}
    <a class="layui-btn layui-btn-primary layui-border-red layui-btn-xs" lay-event="del">设为不可用</a>
    {{#  } }}
    {{#  if(d.status == "0"){ }}
    <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="isT">设为可用</a>
    {{#  } }}
<!--    {{#  if(d.status == "0"){ }}-->
<!--    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="cDelete">彻底删除</a>-->
<!--    {{#  } }}-->
</script>

<!-- 头部工具栏按钮 -->
<script type="text/html" id="toolbarDemo">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="add">添加</button>
        <a id="delBtn" class="layui-btn layui-btn-primary layui-border-red layui-btn-sm" lay-event="delete">设为不可用</a>
        <a id="isTBtn" style="display: none" class="layui-btn layui-btn-warm layui-btn-sm" lay-event="isTAll">设为可用</a>
<!--        <a id="cDeleteBtn" style="display: none" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="cDelete">彻底删除</a>-->
    </div>
</script>
<form class="layui-form" style="display: none" id="commentForm" onsubmit="return false" lay-filter="departmentForm">
    <div class="layui-form-item" style="width: 70%;margin-top: 20px">
        <label class="layui-form-label">部门名称：</label>
        <div class="layui-input-block">
            <input class="layui-input" id="name" name="name" minlength="2" type="text" required=""
                   aria-required="true" lay-verify="name">
        </div>
    </div>
    <input id="uid" name="uid" type="hidden" value="">
</form>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="/static/layui.js" type="text/javascript"></script>
<script src="/static/js/unitList.js" type="text/javascript"></script>
</body>
</html>